1. Field of the Invention
This invention relates to a semiconductor device and a calibration method therefor, and particularly to a semiconductor device in which an element, like a phase-change memory element, the resistance value of which varies in accordance with stored data is used as a memory element, and a calibration method for such a semiconductor device.
2. Description of the Related Art
This type of semiconductor devices is typically designed to read out data from a selected memory element by comparing a cell voltage with a reference voltage. Here, the cell voltage is a voltage corresponding to a level of current flowing through the selected memory element. The reference voltage is a voltage corresponding to a level of current flowing through a reference resistance having a resistance value which is set to a substantially intermediate value between a resistance value when the memory element stores data “1” and a resistance value when the memory element stores data “0”. It is detected whether the data stored in the memory element is “1” or “0” by comparing the cell voltage with the reference voltage. Ideally, the resistance value of each memory element exhibits a resistance value corresponding to the stored data. Actually, however, there exist a great number of memory elements which necessarily do not exhibit the same characteristics. It is therefore required for the resistance value of the reference resistance to be set to such a value that absorbs variation in the resistance value according to the stored data in the memory elements.
In order to solve this problem, the inventor of this invention has previously proposed a semiconductor device configured such that the resistance value of the reference resistance can be set by selecting from a plurality of values, and has filed patent applications for the invention (Japanese Patent Application No. 2008-142098 and U.S. Ser. No. 12/453,988).